package com.oocl.thread;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;

import com.oocl.chat.pojo.Message;

public class SendThread implements Runnable{
	private ObjectOutputStream oos;
	private Message message;
	
	public SendThread(ObjectOutputStream oos,Message message) throws Exception {
		super();
		this.oos = oos;
		this.message = message;
	}
	
	public void run() {
		try {
			oos.writeObject(message);
			oos.flush();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
}
